
package com.joysuch.wwyt.datadump.biz.convertor;

import cn.zlg.common.datadump.annotation.DataDumpField;
import cn.zlg.common.datadump.convertor.FieldValueConvert;
import org.springframework.stereotype.Component;

@Component
public class ImportEduCertificateUserStatusConvertor implements FieldValueConvert<String, Integer> {

    @Override
    public Integer convert(Object bean, String value, DataDumpField dataField) {
        if(value == null) {
            return null;
        }
        if(value.equals("草稿")) {
            return 0;
        } else if(value.equals("归档")) {
            return 1;
        }
        return 2;
    }

}
